import request, { getRequest } from '@/utils/request';

const appId = process.env.VUE_APP_ID;

// export function getEventList({auth, ...data}) {
//   return request({
//     url: getRequest(appId, 'getEventList2'),
//     method: 'post',
//     data,
//     auth
//   });
// }

// export function getOwnerOrgList(){
//   return request({
//     url: getRequest(appId, 'getOwnerOrgList'),
//     method: 'post'
//   })
// }

export function getCompnayCount({auth, ...data}){
  console.log('data------',data)
  return request({
    url: getRequest(appId, 'getCompnayCount'),
    method: 'post',
    data,
    auth
  })
}
// getOperateData 获取月度经营列表
export function getOperateData({auth, ...data}){
  return request({
    url: getRequest(appId, 'getOperateData'),
    method: 'post',
    data,
    auth
  })
}

export function getAllOperateData({auth, ...data}){
  return request({
    url: getRequest(appId, 'getAllOperateData'),
    method: 'post',
    data,
    auth
  })
}

// getProjectManage 融合对接接口
/*
complete_current_month 当前月份完成数
completion_rate_current_month 当前月份完成率
import_date //导入期
planned_completion //当前月份计划完成
project_status //项目状态
short_name // 简称
total_completion_rate //总完成率
total_event //总事项数
*/ 
export function getProjectManage({auth, ...data}){
  return request({
    url: getRequest(appId, 'getProjectManage'),
    method: 'post',
    data,
    auth
  })
}

// getInvestmentDecision 投资决策跟进事项
/*
event_name:事项名称
project_name: 所属项目
event_status:状态
end_time: 完成时间
event_desc: 事项说明
*/ 
export function getInvestmentDecision({auth, ...data}){
  return request({
    url: getRequest(appId, 'getInvestmentDecision'),
    method: 'post',
    data,
    auth
  })
}

// getAfterInvestment 投后重点跟进事项
/*
  参数说明:
  event_name: 事项名称
  project_short_name: 项目简称
  event_department: 责任部门
  event_status: 事项状态
  event_desc: 事项描述
  event_creater: 上报人
  update_time: 上报时间
*/ 
export function getAfterInvestment({auth, ...data}){
  return request({
    url: getRequest(appId, 'getAfterInvestment'),
    method: 'post',
    data,
    auth
  })
}

// 获取某年最大月份
export function getMaxMonthByYear({auth, ...data}){
  return request({
    url: getRequest(appId, 'getMaxMonthByYear'),
    method: 'post',
    data,
    auth
  })
}

// 获取年度累计信息
export function getTotalTypeData({auth, ...data}){
  return request({
    url: getRequest(appId, 'getTotalTypeData'),
    method: 'post',
    data,
    auth
  })
}




